def isPalindrome(s: String): Boolean = {
  if (s.length < 2) true else {
    val len0 = s.length
    val len = len0 / 2
    s.substring(0, len).equals(s.substring(len0 - len, len0).reverse)
  }
}
